
package com.example.spinning.mapper;

import com.example.spinning.bean.YearlyReport;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;


public interface YearlyReportMapper extends Mapper<YearlyReport> {

    //添加一条新的原料记录
    int addNewYearlyReport(YearlyReport yearlyReport);

    //根据id删除原料记录
    int deleteYearlyReportById(@Param("ids") Long[] ids);

    //根据id查记录
    YearlyReport getYearlyReportById(Long id);

    //根据车间查记录
    List<YearlyReport> getYearlyReportByWorkshop(@Param("workshop") String workshop);

    //根据品名查记录
    List<YearlyReport> getYearlyReportByName(@Param("name") String name);
    //查指定品名的数量
    int getNameCount(@Param("name") String name);

    //按日期查找

    //按品名和日期查找

    //修改
    int updateYearlyReportById(YearlyReport yearlyReport);
    //查所有
    List<YearlyReport> getAll(@Param("start") Integer start,@Param("count") Integer count);
    //查总数量
    int getAllCount();

}




